package com.yatop.lalmbda.ai.model;

import com.yuyaogc.lowcode.engine.annotation.*;
import com.yuyaogc.lowcode.engine.plugin.activerecord.Model;

import java.sql.Timestamp;
import java.util.List;

@Table(displayName = "用户作品", name = "ai_product")
public class Product extends Model<Product> {
    @Id
    private Long id;

    @Column(label = "作品")
    private String url;


    @File(label = "url1")
    private String url1;

    @File(label = "url2")
    private String url2;

    @File(label = "url3")
    private String url3;

    @File(label = "url4")
    private String url4;

    @File(label = "url5")
    private String url5;

    @File(label = "url6")
    private String url6;

    @File(label = "url7")
    private String url7;

    @File(label = "url8")
    private String url8;

    @Column(label = "提示词",name = "orig_prompt")
    private String origPrompt;

    @Column(label = "用户id")
    private Long userId;

    @Column(label = "创建时间",name = "create_time")
    private Timestamp createTime;

    @Column(label = "更新时间", name = "update_time")
    private Timestamp updateTime;

    @OneToMany
    private List<Template> templateList;


    public Long getId() {
        return (Long) this.get("id");
    }

    public Product setId(Long id) {
        this.set("id", id);
        return this;
    }

    public String getUrl() {
        return (String) this.get("url");
    }

    public Product setUrl(String url) {
        this.set("url", url);
        return this;
    }

    public String getOrigPrompt() {
        return (String) this.get("origPrompt");
    }

    public Product setOrigPrompt(String origPrompt) {
        this.set("origPrompt", origPrompt);
        return this;
    }

    public Long getUserId() {
        return (Long) this.get("userId");
    }

    public Product setUserId(Long userId) {
        this.set("userId", userId);
        return this;
    }

    public Timestamp getCreateTime() {
        return (Timestamp) this.get("createTime");
    }

    public Product setCreateTime(Timestamp createTime) {
        this.set("createTime", createTime);
        return this;
    }

    public Timestamp getUpdateTime() {
        return (Timestamp) this.get("updateTime");
    }

    public Product setUpdateTime(Timestamp updateTime) {
        this.set("updateTime", updateTime);
        return this;
    }








}
